package com.hf.work03;

/**
 * 拿固定工资的员工
 * @author Lenovo-Healer
 */
public class SalariedEmployee extends ColaEmployee{
    /**
     * 月薪
     */
    private double monthSalary;
    /**
     * 重写
     * @param month 月份
     * @return 工资总和
     */
    @Override
    public double getSalary(int month) {
        return super.getSalary(month)+this.getMonthSalary();
    }


    public SalariedEmployee() {
    }

    /**
     * 有参构造方法
     * @param empName 姓名
     * @param birthdayMonth 生日月份
     * @param monthSalary 月薪
     */
    public SalariedEmployee(String empName, int birthdayMonth, double monthSalary) {
        super(empName, birthdayMonth);
        this.monthSalary = monthSalary;
    }

    public double getMonthSalary() {
        return monthSalary;
    }

    public void setMonthSalary(double monthSalary) {
        this.monthSalary = monthSalary;
    }
}
